package com.ifcar.app.data.dao;

import com.ifcar.app.module.PublishMsg;
import com.ifcar.app.module.Question;
import com.mongodb.DBCursor;
import com.mongodb.WriteResult;

/**
 * 信息发布数据层接口
 * @author nxlixa
 *
 */
public interface PublishData {

	/**
	 * 发布求客信息
	 * @param pubObj
	 * @return
	 */
	WriteResult publishMsgFindPeople(PublishMsg pubObj) throws Exception;

	/**
	 * 发布求车信息
	 * @param pubObj
	 * @return
	 * @throws Exception
	 */
	WriteResult publishMsgFindCar(PublishMsg pubObj) throws Exception;

	/**
	 * 发布一个问题
	 * @param qu
	 * @return
	 * @throws Exception
	 */
	WriteResult publishQuestioin(Question qu) throws Exception;
	
	/**
	 * 回答一个问题
	 * @param qu
	 * @return
	 * @throws Exception
	 */
	WriteResult publishAnswer4Questioin(Question qu) throws Exception;

	/**
	 * 根据查询一个问题
	 * @param questionId
	 * @return
	 */
	DBCursor findQuestionObjByQid(String questionId) throws Exception;
	
}
